import http from '../utils/request.js'

// 请求首页的数据
export const getData = () => {
   // 返回一个promise对象
   return http.get('/home/getData')
}

export const getUser = (params) => {
   // 返回用户列表
   return http.get('/user/getuser', params)
}
export const addUser = (data) => {
   // 新增用户信息
   return http.post('/user/add', data)
}
export const editUser = (data) => {
   // 编辑用户信息
   return http.post('/user/edit', data)
}
export const delUser = (data) => {
   // 删除用户信息
   return http.post('/user/del', data)
}

export const getMenu = (data) => {
   // 登录用户
   return http.post('/permission/getMenu', data)
}